------------- tai khoan tiet kiem ----------------
-------------- Thong Tin tai khoan tiet kiem --------------
if exists (select name from sysobjects where name like 'Proc_TaiKhoanTietKiem_GetById')
	drop procedure Proc_TaiKhoanTietKiem_GetById
go

create PROC Proc_TaiKhoanTietKiem_GetById (@maTKTK int )
as
	select * from TaiKhoanTietKiem
	where MaTKTietKiem = @maTKTK
go

Exec Proc_TaiKhoanTietKiem_GetById 1
go


------------------xem thong tin tai khoan tiet kiem  qua ma tai khoan chinh ------------------
if exists (select name from sysobjects where name like 'Proc_TaiKhoanTietKiem_GetByMaTKChinh')
	drop procedure Proc_TaiKhoanTietKiem_GetByMaTKChinh
go

create PROC Proc_TaiKhoanTietKiem_GetByMaTKChinh (@maTK int )
as
	select * from TaiKhoanTietKiem
	where MaTKChinh = @maTK
go

Exec Proc_TaiKhoanTietKiem_GetByMaTKChinh 1
go

------------------------- xem thong tin tai khoan tiet kiem qua ma loai tk---------------
if exists (select name from sysobjects where name like 'Proc_TaiKhoanTietKiem_GetByMaLoaiTK')
	drop procedure Proc_TaiKhoanTietKiem_GetByMaLoaiTK
go

create PROC Proc_TaiKhoanTietKiem_GetByMaLoaiTK (@maLoaiTK int )
as
	select * from TaiKhoanTietKiem
	where MaLoaiTK = @maLoaiTK
go

Exec Proc_TaiKhoanTietKiem_GetByMaLoaiTK 1
go


---------------- xem thong tin  chi tiet lai suat ---------------
if exists (select name from sysobjects where name like 'Proc_TaiKhoanTietKiem_GetByMaChiTietLS')
	drop procedure Proc_TaiKhoanTietKiem_GetByMaChiTietLS
go

create PROC Proc_TaiKhoanTietKiem_GetByMaChiTietLS (@maChiTietLS int )
as
	select * from TaiKhoanTietKiem
	where MaChiTietLS = @maChiTietLS
go

Exec Proc_TaiKhoanTietKiem_GetByMaChiTietLS 1
go
